package com.isoftstone.studentregistration.service;

import com.github.pagehelper.Page;
import com.isoftstone.studentregistration.pojo.Users;
import com.isoftstone.studentregistration.util.Result;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * 业务层接口：处理业务逻辑
 */
public interface UserService {

    //添加用户
    Result<?> insertUser(Users user);
    //修改用户
    Result<?> updateUser(Users user);
    //删除用户
    Result<?> deleteUser(Integer id);
    //查询所有用户
    Page<Users> queryAllUsers(Integer currentPage, Integer pageSize);
    //根据id查询用户
    Users queryUserById(Integer id);
    Result<?> login(String phone, String password);
    //导出文件
    void exportExcel(HttpServletResponse  response) throws IOException;
    //批量删除
    int batchDeleteUser(List<Integer> ids);
}
